<div ng-include="'html/component/nav.html'" ng-controller="NavCtrl"></div>
<ul class="set_item" ng-include="'html/component/left_nav.html'" ng-controller="CunhuoNavCtrl"></ul>
<style>
    .set_cont.list_page .list_table th, .set_cont.list_page .list_table td {
        width: auto;
    }
</style>
<div class="set_box">
    <h1 class="set_title">零售销货单 <span class="title_btn_group"> <!--<a class="title_btn"  href="javascript:void(0);" ng-click="search();" >查询{{language.ACT_INQUIRE}}</a>--> <a class="title_btn" ng-show="listShow == 1" href="javascript:void(0);" ng-click="close_detail();"><!--关闭-->{{language.ACT_CLOSE}}</a> </span></h1>
    <div class="set_cont list_page" ng-show="listShow == 0">
        <table class="list_table">
            <thead>
                <tr>
                    <th><!--单据编号-->{{language.TIPS_INVENTORY_DOC_CODE}}</th>
                    <th><!--数量-->{{language.TIPS_INVENTORY_NUM}}</th>
                    <th><!--金额-->{{language.TIPS_INVENTORY_MONEY}}</th>
                    <th>库位</th>
                    <th>计税金额</th>
                    <th>有效业绩金额</th>
                    <th>制单人</th>
                    <th>备注</th>
                    <th>确认</th>
                </tr>
            </thead>
            <tbody ng-repeat="i in receiptList">
                <tr class="date_num">
                    <td class="date" colspan="8">日期{{language.TIPS_INVENTORY_DATE}}：{{i.key}}</td>
                    <td class="num"><span>{{i.value.length}}</span></td>
                </tr>
                <tr class="list_unit"  ng-repeat="li in i.value" >
                    <td ng-click="getDetail(li);"><a href="javascript:void(0)">{{li.djbh}}</a></td>
                    <td>{{li.sl}}</td>
                    <td>{{li.je}}</td>
                    <td>{{li.kw_id}}</td>
                    <td>{{li.jsje}}</td>
                    <td>{{li.yxyjje}}</td>
                    <td>{{li.zdr}}</td>
                    <td>{{li.is_check}}</td>
                    <td>{{li.qr|check_is_sure}}</td>
                </tr>
            </tbody>
        </table>
        <div class="btn_more"><button class="btn" ng-click='nextpage();' ng-show="is_show"></button></div>
    </div>
    <div class="set_cont detail_page" ng-show="listShow == 1" ng-swipe-right="close_detail();">
        <form class="detail_form">
            <p class="title">
                基本信息
            </p>
            <table class="detail_table">
                <tr>
                    <td class="name"><!--日期-->{{language.TIPS_INVENTORY_DATE}}：</td>
                    <td class="val" ng-bind="receiptListDetails.rq1| date:'yyyy - MM - dd'"></td>
                    <td class="name">单据编号：</td>
                    <td class="val">{{receiptListDetails.djbh}}</td>
                </tr>
                <tr>
                    <td class="name">店铺：</td>
                    <td class="val">{{receiptListDetails.zdmc}}</td>
                    <td class="name">库位：</td>
                    <td class="val">{{receiptListDetails.kw_id}}</td>
                </tr>
                <tr>
                    <td class="name"><!--数量-->{{language.TIPS_INVENTORY_NUM}}：</td>
                    <td class="val">{{receiptListDetails.sl}}</td>
                    <td class="name"><!--总价-->{{language.TIPS_INVENTORY_TOTAL_PRICE}}：</td>
                    <td class="val">{{receiptListDetails.je|number:2}}</td>
                </tr>
                <tr>
                    <td class="name">确认：</td>
                    <td class="val">{{receiptListDetails.qr|check_is_sure}}</td>
                    <td class="name">确认时间：</td>
                    <td class="val" ng-bind="receiptListDetails.qrrq1| date:'yyyy - MM - dd'"></td>
                </tr>
                <tr>
                    <td class="name">计税金额：</td>
                    <td class="val">{{receiptListDetails.jsje}}</td>
                    <td class="name">有效业绩金额：</td>
                    <td class="val">{{receiptListDetails.yxyjje}}</td>
                </tr>
                <!--                <td class="name">备注：</td>
                <td class="val">{{receiptList.bz}}</td>
                <td class="val">{{}}</td>-->
            </table>
        </form>
        <form class="detail_form">
            <p class="title">
                <!--商品明细-->
                {{language.TIPS_INVENTORY_DETAILED}}
            </p>
            <table class="goods_table">
                <tr>
                    <th>导购员</th>
                    <th>商品代码</th>
                    <th>商品名称</th>
                    <!--<th>小票编号</th>-->
                    <th>颜色</th>
                    <th>尺码</th>
                    <th>参考价</th>
                    <th>折扣</th>
                    <th>金额</th>
                    <th>数量</th>
<!--                    <th>计税价格</th>
                    <th>计税金额</th>
                    <th>有效业绩金额</th>-->
                    <th>结算金额</th>
                </tr>
                <tr ng-repeat="p in saleDetails">
                    <td>{{p.dgy_list_mc}}</td>
                    <td>{{p.spdm}}</td>
                    <td>{{p.spmc}}</td>
                    <!--<td>{{p.xpbh}}</td>-->
                    <td>{{p.gg1mc}}</td>
                    <td>{{p.gg2mc}}</td>
                    <td>{{p.ckj}}</td>
                    <td>{{p.zk}}</td>
                    <td>{{p.je}}</td>
                    <td>{{p.sl}}</td>
<!--                    <td>{{p.jsjg}}</td>
                    <td>{{p.jishuije}}</td>
                    <td>{{p.yxyjje}}</td>-->
                    <td>{{p.jsje}}</td>
                </tr>
            </table>
            <p class="title">
                结算明细
            </p>
            <table class="goods_table">
                <tr>
                    <th>结算代码</th>
                    <th>结算名称</th>
                    <th>金额</th>
                    <th>外币金额</th>
                    <th>汇率</th>
                    <th>汇差金额</th>
                </tr>
                <tr ng-repeat="p in checkType">
                    <td>{{p.jsdm}}</td>
                    <td>{{p.jsmc}}</td>
                    <td>{{p.je}}</td>
                    <td>{{p.wb_je}}</td>
                    <td>{{p.hl}}</td>
                    <td>{{p.hc_je}}</td>
                </tr>
            </table>
            <!--            <p class="title">
                            附加信息
                        </p>
                        <table class="goods_table">
                            <tr>
                                <th>制单人</th>
                                <th>制单日期</th>
                                <th>确认人</th>
                                <th>确认日期</th>
                            </tr>
                            <tr ng-repeat="p in saleDetails">
                                <td>{{p.zdr}}</td>
                                <td ng-bind="p.zdrq | date:'yyyy-MM-dd'"></td>
                                <td>{{}}</td>
                                <td>{{p.qrrq}}</td>
                            </tr>
                        </table>-->
        </form>
    </div>
</div>
